import Vue from 'vue'
import VueRouter from 'vue-router'
import Find from '@/views/Find'
import My from '@/views/My'
import Friend from '@/views/Friend'
import Songs from '@/views/Songs'
import Is404 from '@/views/is404'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/find' },
  { path: '/find', component: Find },
  { path: '/my', component: My },
  { path: '/friend', component: Friend },
  { path: '/songs:id', component: Songs },
  { path: '*', component: Is404 }
]

const router = new VueRouter({
  routes
})

export default router
